﻿using Clancy.Interfaces;
using System;
using System.Linq;
using System.Runtime.Serialization;

namespace Clancy.Data
{
    [DataContract]
    public class SurveilanceResultFrame : ISurveilanceResultFrame
    {
        [DataMember]
        public bool AlarmTriggered { get; set; }

        [DataMember]
        public byte[] Frame { get; set; }

        [DataMember]
        public float FrameDifference { get; set; }

        [DataMember]
        public double FramesPerSecond { get; set; }

        [DataMember]
        public bool Recording { get; set; }

        [DataMember]
        public DateTime Timestamp { get; set; }

        public override string ToString()
        {
            return string.Format("{0}, Timestamp: {1}, FrameDiff: {2}, Alarm: {3}",
                base.ToString(), Timestamp.ToString("hh:mm:ss.fff"), FrameDifference, AlarmTriggered);
        }
    }
}